<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
    <link rel="stylesheet" href="images/table.css" type="text/css"></link>
  	<script type="text/javascript" src="js/jquery-1.8.2.js"></script> 
    <script type="text/javascript" src="js/tableScoll.js"></script>
    <script type="text/javascript" src="js/store.js"></script> 
    <script type="text/javascript" src="js/Calendar3.js"></script> 
</head>
  <body>
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">设备修改</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	      <tr>
	        <td colspan="2" valign="top">&nbsp;</td>
	        <td>&nbsp;</td>
	        <td valign="top">&nbsp;</td>
	      </tr>
	      <tr>
	        <td colspan="2" valign="top">
	      		<!--  控件按钮栏-->
		                 	 <input type="button" name="storeSave"  id="storeSave"  value="保存" onclick="submitForm()"/>
		     </td>
		     <td>&nbsp;</td>
		  </tr>
		  <tr>
	        <td height="40" colspan="4">
	        	<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
			          <tr>
			            <td></td>
			          </tr>
	        	</table>
	        </td>
		  </tr>
		  <tr>
		  	 <td colspan="30">
		     <!--  table栏-->
		     
		     <form id="modeifyStoreForm" action="<%=basePath%>/storeAction_modifyStoreInfo.action"  method="post">
			   <c:set var="storeBean" scope="request" value="${store}"/>
			    <table >
			       <tr>
		      		   <input type="hidden"  id="stStoreId"   name="store.stStoreId"  value="${storeBean.stStoreId}" />
		       			<td>SN编号:<input type="text"  id="stSnNumber"   name="store.stSnNumber"  value="${storeBean.stSnNumber}" /></td>
		       			<td>设备属性:<select  id="stStoreType"   name="store.stStoreType"  >
		       					<c:set var="typeList" scope="request" value="${storeType}"/>
	 	   						<c:forEach items="${typeList}" var="bean"  varStatus="status">
									<option value="${bean.stStoreNo}">${bean.stStoreName} - ${bean.stStoreType}</option>
								</c:forEach>
								</select>
						</td>
			 	    </tr>
			 	    <tr>
		 	    		<td>设备单价:<input type="text"  id="stStorePrice"   name="store.stStorePrice"  value="${storeBean.stStorePrice}" /></td>
						<td>设备厂商:<input type="text"  id="stFactory"   name="store.stFactory"  value="${storeBean.stFactory}" /></td>
			 	    </tr>
			 	    <tr>
			 	    	<td>设备出厂时间:<input type="text"  id="stFactoryDate"   name="store.stFactoryDate"  value="${storeBean.stFactoryDate}"  onclick="new Calendar().show(this);"/>
			 	    	<input type="button"  style="background-image:url(images/calendar.png);width:32;height:32"  onclick="new Calendar().show(this.form.stFactoryDate);" /></td>
			 	    </tr>
			 		</table>
			 	 </form>
		     </td>
		  </tr>
		  <!-- 翻页工具  -->
		  <tr>
		  </tr>
	      <tr>
	        <td height="40" colspan="4">
	        	<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
			          <tr>
			            <td></td>
			          </tr>
	        	</table>
	        </td>
	      </tr>
	      <tr>
	        <td width="2%">&nbsp;</td>
	        <td width="51%" class="left_txt"><img src="images/icon-mail2.gif" width="16" height="11"> <br>
	              <img src="images/icon-phone.gif" width="17" height="14"> </td>
	        <td>&nbsp;</td>
	        <td>&nbsp;</td>
	      </tr>
	</table>
    </td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
</tr>
<tr>
   <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
   <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
   <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
</tr>
</table>
  </body>
  <script type="text/javascript">
	function submitForm(){  
	    var stSnNumber =  document.getElementById("stSnNumber").value;  
	    var stStorePrice =  document.getElementById("stStorePrice").value;  
		
		regNumber=/^[0-9a-zA-Z]{0,24}$/;
		if(!regNumber.exec(stSnNumber)){
			alert("SN编号错误");
			return false;
		}
		var form = document.getElementById("modeifyStoreForm");  
		form.submit();   
    }
</script>
</html>
